﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using NP.BPMReportPlatform.Course.Dtos;
using NP.BPMReportPlatform.Entities.BPM_Business;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace NP.BPMReportPlatform.Course
{
    [Authorize]
    [ApiController]
    [Route("api/CourseBase")]
    public class CourseBaseController : BPMReportPlatformController
    {
        private readonly ICourseBaseAppService _courseBaseAppService;
        public CourseBaseController(ICourseBaseAppService courseBaseAppService)
        {
            _courseBaseAppService = courseBaseAppService;
        }

        /// <summary>
        /// 获取课程基础对象集合
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpGet]
        [Route("GetCourseBase")]
        public async Task<List<CourseBase>> GetCourseBase([FromQuery] CourseBaseInput input)
        {
            return await _courseBaseAppService.GetCourseBase(input);
        }
    }
}
